package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetMealDishMapper {
    /**
     * 批量插入关联
     * @param setMealDishes
     */
    void insertBatch(List<SetmealDish> setMealDishes);

    /**
     * 批量删除，根据setmealId
     * @param ids
     */
    void deleteBatchBySetMealId(List<Integer> ids);

    /**
     * 根据套餐id来查
     * @param setMealId
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setMealId};")
    List<SetmealDish> findBySetMealId(Long setMealId);
}
